/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-07-22
 * Time: 11:01
 */
class SingletonLazy {
    private static Object locker1 = new Object();
    private static volatile SingletonLazy instance = null;

    public static SingletonLazy getSingletonLazy() {
        if(instance == null) {
            synchronized(locker1) {
                if(instance == null) {
                    instance = new SingletonLazy();
                }
            }
        }
        return instance;
    }

    private SingletonLazy() {};
}

public class Demo2 {
    public static void main(String[] args) {

    }
}
